package com.example.guardian.anticheatguard;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;

import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;

import com.example.guardian.R;
import com.example.guardian.home.ChatActivity;

public class news_details extends AppCompatActivity {
    private String web;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.anti_detail);

        Intent i = this.getIntent();
        web = i.getStringExtra("web");

        ActionBar actionBar = getSupportActionBar();
        Context appContext = getApplicationContext();
        if (actionBar != null) {
            actionBar.hide();
        }
        Button back_button = findViewById(R.id.anti_back_btn);
        WebView webView=(WebView)findViewById(R.id.web);

        webView.getSettings().setJavaScriptEnabled(true);
        webView.setWebViewClient(new WebViewClient());
        webView.loadUrl(web);
        back_button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                news_details.this.finish();
            }
        });


    }
}
